import Vue from "vue";
import Router from "vue-router";

import index from "./views/index.vue";
import hot from "./views/hot.vue";
import jhs from "./views/jhs.vue";
import tttm from "./views/tttm.vue";
import yhh from "./views/yhh.vue";
import search from "./views/search.vue";
import de from "./views/de.vue";
import clf from "./views/clf.vue";
import yhjcx from "./views/yhjcx.vue";

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: "/",
      redirect: "/index",
      meta: {
        // 页面标题title
        title: '小淘秒杀网'
      }
    },
    {
      path: "/index",
      name: "index",
      component: index,
      meta: {
        // 页面标题title
        title: '小淘秒杀网'
      }
    },
    {
      path: "/hot",
      name: "hot",
      component: hot,
      meta: {
        // 页面标题title
        title: '淘抢购'
      }
    },
    {
      path: "/jhs",
      name: "jhs",
      component: jhs,
      meta: {
        // 页面标题title
        title: '聚划算'
      }
    },
    {
      path: "/tttm",
      name: "tttm",
      component: tttm,
      meta: {
        // 页面标题title
        title: '天天特卖'
      }
    },
    {
      path: "/yhh",
      name: "yhh",
      component: yhh,
      meta: {
        // 页面标题title
        title: '有好货'
      }
    },
    {
      path: "/search",
      name: "search",
      component: search,
      meta: {
        // 页面标题title
        title: '宝贝搜索'
      }
    },
    {
      path: "/de",
      name: "de",
      component: de,
      meta: {
        // 页面标题title
        title: '大额券'
      }
    },
    {
      path: "/clf",
      name: "clf",
      component: clf,
      meta: {
        // 页面标题title
        title: '潮流范'
      }
    },
    {
      path: "/yhjcx",
      name: "yhjcx",
      component: yhjcx,
      meta: {
        // 页面标题title
        title: '优惠卷查询'
      }
    }
  ]
});
